package com.yunqiao.common.config;

import cn.hutool.cache.CacheUtil;
import cn.hutool.cache.impl.TimedCache;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CacheConfig {
    @Bean
    public TimedCache<String, String> getTimedCache(){
        TimedCache<String, String> timedCache= CacheUtil.newTimedCache(5*36000);
        timedCache.schedulePrune(5);
        return timedCache;
    }
}
